package com.zenithmind.document.pojo.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zenithmind.common.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 文档权限实体类
 * 
 * @author ZenithMind Team
 * @since 2025-01-09
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("document_permission")
@Schema(description = "文档权限实体")
public class DocumentPermission extends BaseEntity {

    /**
     * 文档ID
     */
    @TableField("document_id")
    @Schema(description = "文档ID")
    private String documentId;

    /**
     * 用户ID
     */
    @TableField("user_id")
    @Schema(description = "用户ID")
    private String userId;

    /**
     * 角色ID
     */
    @TableField("role_id")
    @Schema(description = "角色ID")
    private String roleId;

    /**
     * 部门ID
     */
    @TableField("department_id")
    @Schema(description = "部门ID")
    private String departmentId;

    /**
     * 权限类型（view, download, edit, delete, share）
     */
    @TableField("permission_type")
    @Schema(description = "权限类型")
    private String permissionType;

    /**
     * 授权者ID
     */
    @TableField("granted_by")
    @Schema(description = "授权者ID")
    private String grantedBy;

    /**
     * 过期时间
     */
    @TableField("expire_time")
    @Schema(description = "过期时间")
    private LocalDateTime expireTime;

    /**
     * 状态（0:禁用, 1:启用）
     */
    @TableField("status")
    @Schema(description = "状态（0:禁用, 1:启用）")
    private Integer status;
}
